package com.liu.exception;

import com.liu.bean.ResultBean;
import com.liu.controller.BaseController;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler extends BaseController {

    @ExceptionHandler(NullPointerException.class)
    public ResultBean handlerException(Exception e){
        return fail("接口异常");
    }


}
